home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 12924 < prev    next >
Encoding:
Text File  |  1996-08-05  |  883 b   |  38 lines

  1. Newsgroups: comp.lang.c++
  2. Path: fcmc.com!acdc!anant
  3. From: anant@acdc (Anant Bhatnagar (Technology Grp))
  4. Subject: Implementation of Patterns
  5. Keywords:  Patterns, C++, templates
  6. Distribution: comp.lang.c++
  7. Message-ID: <DoL4xF.94C@firewall.fcmc.com>
  8. Sender: nobody@firewall.fcmc.com
  9. Organization: Fuji Capital Markets Corp
  10. Date: Wed, 20 Mar 1996 21:27:15 GMT
  11.  
  12. I am reading the book "Tamning C++" by Dr. Jiri Soukup about how to 
  13. implement patterns. It has started to confuse me :-)
  14. I just need a clarification on one of the examples illustrated in the
  15. book. ( Example # 4.3 )
  16.  
  17. Why does the author need two template instantiations e.g.
  18.  
  19. the example uses:
  20.  
  21. slist_base<1> L1  // encapsulates list1
  22. slist_base<2> L2  // encapsulates list2
  23.  
  24. Why can't we just have 
  25.  
  26. slist_base<1> L1, L2; 
  27.  
  28. instead.
  29.  
  30. Whats the main point I am missing here ?
  31.  
  32. Thank you
  33.  
  34. Anant Bhatnagar ( anant@fcmc.com )
  35.  
  36.  
  37.  
  38.